package cn.edu.xcu.ckl.mapper;

import cn.edu.xcu.ckl.domain.CarInfo;
import cn.edu.xcu.ckl.domain.OrderInfo;
import cn.edu.xcu.ckl.domain.ProductInfo;
import cn.edu.xcu.ckl.domain.UserInfo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;


@Mapper
public interface UserInfoMapper {

    int register(UserInfo userInfo);

    UserInfo login(UserInfo userInfo);

    int edit(UserInfo userInfo);

    List<ProductInfo> queryProductList(String product_type);

    int addCar(CarInfo carInfo);

    CarInfo isAddCar(CarInfo carInfo);

    int updateCar(CarInfo carInfo);

    List<CarInfo> queryCarByUsername(String username);

    int delCarById(int car_id);

    int createOrder(List<OrderInfo> list);

    List<OrderInfo> queryOrderByUsername(String username);

    int clearCarByUsername(List<CarInfo> list);

    int delOrderById(int order_id);

    int delProduct(int _id);

    int editProduct(ProductInfo productInfo);

    int addProduct(ProductInfo productInfo);

    List<ProductInfo> queryProductTypeList();

    int delProductTypeById(int product_id);

    int editProductType(ProductInfo productInfo);

    int addProductType(ProductInfo productInfo);

    ProductInfo isProductType(String product_title);
}
